﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="DomusDotNet.Sbm.Client.SL4noCM.Views.LoginView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:tk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:viewmodel="clr-namespace:DomusDotNet.Sbm.Client.SL4noCM.ViewModels" xmlns:DefaultButton="clr-namespace:DomusDotNet.Sbm.Client.SL4noCM.Infrastructure" mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400">
    <UserControl.DataContext>
        <viewmodel:LoginViewModel></viewmodel:LoginViewModel>
    </UserControl.DataContext>
    <Border Style="{StaticResource GreenPanel}"
				VerticalAlignment="Top"
				HorizontalAlignment="Center"
				Margin="0 50 0 0"
				Width="300">
        <Border.Effect>
            <DropShadowEffect ShadowDepth="3"
                                  Color="Black" />
        </Border.Effect>
        <tk:BusyIndicator IsBusy="{Binding Path=WebRequestExecution}">
            <StackPanel Margin="20">
                <TextBlock>Username</TextBlock>
                <TextBox Name="Username"  Text="{Binding Path=Username, Mode=TwoWay}"/>
                <TextBlock>Password</TextBlock>
                <PasswordBox Name="Password" Password="{Binding Path=Password, Mode=TwoWay}" />

                <TextBlock Name="ErrorMessage"
							   Style="{StaticResource Error}" 
                           Text="{Binding Path=ErrorMessage}"/>

                <Button Name="Login"
							Content="Login"
							HorizontalAlignment="Right"
                        Command="{Binding Path=LoginCommand}"/>

			 
				
            </StackPanel>
        </tk:BusyIndicator>
		
		
    </Border>
</UserControl>
